package com.szu.tcp.socket;

import java.util.ArrayList;

import com.szu.file.explore.FileState;
import com.szu.file.explore.FileStyle;

import android.content.Context;
import android.util.Log;

public class TcpHelper 
{
	private Context mContext=null;
	private static final String TAG="TcpHelper";
//	private ArrayList<FileStyle>fileStyles; 
	private TcpClient tcpClient;
	private String target_IP="192.16.137.4";
	
	public TcpHelper(Context context)
	{
		mContext=context;
		
	}
	
	public void sendFile(ArrayList<FileStyle> files,ArrayList<FileState>fileStates)
	{
		tcpClient=new TcpClient(mContext);
//		if(!tcpClient.getThread().isAlive())
			tcpClient.startSend();
		for(FileStyle file:files)
		{
//			Log.d(TAG, file.fullPath);
		}
		for(FileState fileState:fileStates)
		{
			Log.d(TAG, fileState.fileName);
		}
		tcpClient.sendFile(files, fileStates, target_IP);
	}
	
}
